From 232461371f459aaec4ea2dbc991332eb000b9920 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Mon, 30 Jun 2014 23:27:33 -0700 Subject: [PATCH] Improvements based on the review --- src/cargo/ops/cargo_read_manifest.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cargo/ops/cargo_read_manifest.rs b/src/cargo/ops/cargo_read_manifest.rs index e21472af1..83eeca006 100644 --- a/src/cargo/ops/cargo_read_manifest.rs +++ b/src/cargo/ops/cargo_read_manifest.rs @@ -35,7 +35,7 @@ pub fn read_packages(path: &Path, try!(walk(path, true, |dir| { log!(5, "looking for child package: {}", dir.display()); if dir.filename_str() == Some(".git") { return Ok(false); } - if dir.join(".git").is_dir() { return Ok(false); } + if dir.join(".git").exists() { return Ok(false); } try!(process_possible_package(dir, &mut all_packages, source_id, &mut visited)); Ok(true) })); @@ -90,9 +90,9 @@ fn read_nested_packages(path: &Path, source_id: &SourceId, let mut ret = vec![pkg]; for p in nested.iter() { - ret.push_all(try!(read_nested_packages(&path.join(p), + ret.push_all_move(try!(read_nested_packages(&path.join(p), source_id, - visited)).as_slice()); + visited))); } Ok(ret) -- 2.30.2